<?php

declare(strict_types=1);
/**
 * This file is part of Hyperf.
 *
 * @link     https://www.hyperf.io
 * @document https://hyperf.wiki
 * @contact  group@hyperf.io
 * @license  https://github.com/hyperf/hyperf/blob/master/LICENSE
 */

namespace App\Service;

use App\Service\Dao\FangDao;
use Han\Utils\Service;
use Hyperf\Di\Annotation\Inject;

class FangService extends Service
{
    #[Inject]
    protected FangDao $dao;

    public function listZufang(int $page = 1, int $limit = 10): array
    {
        return $this->dao->getList('zufang', $page, $limit);
    }

    public function listShoufang(int $page = 1, int $limit = 10): array
    {
        return $this->dao->getList('shoufang', $page, $limit);
    }

    public function getFangDetail($id, $kind)
    {
        return $this->dao->getDetail($id, $kind);
    }
}
